define(['./../initial', './../service/mapInstance'], function() {
    var app = angular.module('App.home');
    app.directive('prjSummaryPopup', ['mapInstance', '$compile', '$rootScope', '$q',
        function(mapInstance, $compile, $rootScope, $q) {
            return {
                restrict: 'A',
                scope: {
                    'prj': '='
                },
                link: function(scope, el, attrs) {
                    var prj = scope.prj;
                    scope.prjMarkerClick = function() {
                        //暂未开放
                        alert('暂未开放!!');
                        return;
                        // if (prj.hasJsonLayer === false) {

                        // } else {
                        //     var map = mapInstance.getMap();
                        //     map.fireEvent('prjMarkerClick', {
                        //         prjId: prj.prjId
                        //     });
                        // }
                    };
                },
                templateUrl: '/partials/prjSummaryPopup.html'
            };
        }
    ]);

});
